<!--#include("header.html")-->

<form action="{Context::getRequestUri()}" method="post" onsubmit="return procFilter(this, window.insert)" class="issuetrackerWrite">
<input type="hidden" name="vid" value="{$vid}" />
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="content" value="{$oIssue->getContentText()}" />
<input type="hidden" name="document_srl" value="{$document_srl}" />

<div class="issuetrackerWriteHeader">
    <!--@if($oIssue->getTitleText())-->
    <input type="text" name="title" id="postTitle" class="inputText" value="{htmlspecialchars($oIssue->getTitleText())}" />
    <!--@else-->
    <input type="text" name="title" id="postTitle" class="inputText" value="{$lang->title}" title="{$lang->title}" onfocus="if(this.title == this.value) this.value='';" />
    <!--@end-->

    <table border="1" cellspacing="0" summary="Extra Form" class="extraVarsList">
	<caption><em>*</em> : {$lang->is_required}</caption>
    <!--@if(count($extra_keys))-->
    <!--@foreach($extra_keys as $key => $val)-->
    <tr>
        <th scope="row">{$val->name} <!--@if($val->is_required=='Y')--><em>*</em><!--@end--></th>
        <td>{$val->getFormHTML()}</td>
    </tr>
    <!--@end-->
    <!--@end-->

    <!--@if(!$oIssue->isExists())-->
    <!--@if($grant->commiter)-->
	<tr>
	    <th scope="row"><label for="inputMilestone">{$lang->milestone}</label></th>
		<td>
			<select name="milestone_srl" id="inputMilestone">
				<option value="0">{$lang->milestone}</option> 
			<!--@foreach($project->milestones as $val)-->
				<option value="{$val->milestone_srl}" <!--@if($oIssue->get('milestone_srl')==$val->milestone_srl)-->selected="selected"<!--@end-->>{$val->title}</option>
			<!--@end-->
			</select>
		</td>
    </tr>
    <tr>
		<th scope="row"><label for="inputPriority">{$lang->priority}</label></th>
		<td>
			<select name="priority_srl" id="inputPriority">
				<option value="">{$lang->priority}</option> 
				<!--@foreach($project->priorities as $key => $val)-->
				<option value="{$val->priority_srl}" <!--@if($val->priority_srl==$oIssue->get('priority_srl'))-->selected="selected"<!--@end-->>{$val->title}</option> 
				<!--@end-->
			</select>
		</td>
    </tr>
    <!--@end-->
    <!--@if($grant->commiter && count($project->packages))-->
    <tr>
        <th scope="row"><label for="inputPackage">{$lang->occured_version}</label> <em>*</em></th>
        <td>
            <select name="package_srl" id="inputPackage" onchange="showRelease(this,this.form);">
                <option value="">{$lang->package}</option> 
                <!--@foreach($project->packages as $key => $val)-->
                <option value="{$val->package_srl}" <!--@if($val->package_srl==$oIssue->get('package_srl'))-->selected="selected"<!--@end-->>{$val->title}</option> 
                <!--@end-->
            </select>
            <select name="release_srl">
                <option value="">{$lang->release}</option> 
                <!--@foreach($project->packages as $key => $val)-->

                <!--@if($val->package_srl==$oIssue->get('package_srl'))-->

                <!--@foreach($project->releases as $k => $v)-->
                <!--@if($val->package_srl == $v->package_srl)-->
                <option value="{$v->release_srl}" <!--@if($v->release_srl==$oIssue->get('occured_version_srl'))-->selected="selected"<!--@end-->>{$v->title}</option> 
                <!--@end-->
                <!--@end-->

                <!--@end-->

                <!--@end-->
            </select>
        </td>
    </tr>
    <!--@end-->
    <tr>
        <th scope="row"><label for="inputType">{$lang->type}</label> <em>*</em></th>
        <td>
            <select name="type_srl" id="inputType">
                <option value="">{$lang->type}</option> 
                <!--@foreach($project->types as $key => $val)-->
                <option value="{$val->type_srl}" <!--@if($val->type_srl==$oIssue->get('type_srl'))-->selected="selected"<!--@end-->>{$val->title}</option> 
                <!--@end-->
            </select>
        </td>
    </tr>
    <tr>
        <th scope="row"><label for="inputComponent">{$lang->component}</label> <em>*</em></th>
        <td>
            <select name="component_srl" id="inputComponent">
                <option value="">{$lang->component}</option> 
                <!--@foreach($project->components as $key => $val)-->
                <option value="{$val->component_srl}" <!--@if($val->component_srl==$oIssue->get('component_srl'))-->selected="selected"<!--@end-->>{$val->title}</option> 
                <!--@end-->
            </select>
        </td>
    </tr>
    <!--@if($grant->commiter)-->
    <tr>
        <th scope="row"><label for="inputAssignee">{$lang->assignee}</label></th>
        <td>
            <select name="assignee_srl" id="inputAssignee" >
                <option value="" selected="selected">{$lang->assignee}</option>
                <!--@foreach($commiters as $key => $val)-->
                <option value="{$val->member_srl}">{$val->nick_name} ({$val->user_id})</option> 
                <!--@end-->
            </select>
        </td>
    </tr>
    <!--@end-->
    <!--@end-->
    </table>

    <div class="editor">{$oIssue->getEditor()}</div>

    <div class="tag">
        <input type="text" name="tags" value="{htmlspecialchars($oIssue->get('tags'))}" class="inputText" title="Tag" />
		<p>{$lang->about_tag}</p>
    </div>

	<div class="editorOption">
		<!--@if(!$is_logged)-->
		   <input type="text" name="nick_name" class="inputText userName" value="{$lang->writer}" onfocus="this.value=''" />
		   <input type="password" name="password" class="inputText userPw" value="{$lang->password}" onfocus="this.value=''" />
		   <input type="text" name="email_address" class="inputText emailAddress" value="{$lang->email_address}" onfocus="this.value=''" />
		   <input type="text" name="homepage" class="inputText homePage" value="{$lang->homepage}" onfocus="this.value=''" />
		<!--@end-->
		
        <!--@if($grant->manager)-->
        {@ $_color = array('555555','222288','226622','2266EE','8866CC','88AA66','EE2222','EE6622','EEAA22','EEEE22') }
        <select name="title_color" id="title_color" <!--@if($oIssue->get('title_color'))-->style="color:#{$oIssue->get('title_color')};"<!--@end--> onchange="this.style.color=this.options[this.selectedIndex].style.color;">
                <option value="" style="color:#CCCCCC;">{$lang->title_color}</option>
                <!--@foreach($_color as $_col)-->
                <option value="{$_col}" style="color:#{$_col}" <!--@if($oIssue->get('title_color')==$_col)-->selected="selected"<!--@end-->>{$lang->title_color}</option>
                <!--@endforeach-->
            </select>
            <input type="checkbox" name="title_bold" id="title_bold" value="Y" <!--@if($oIssue->get('title_bold')=='Y')-->checked="checked"<!--@end--> />
            <label for="title_bold">{$lang->title_bold}</label>
            <input type="checkbox" name="is_notice" value="Y" <!--@if($oIssue->isNotice())-->checked="checked"<!--@end--> id="is_notice" />
            <label for="is_notice">{$lang->notice}</label>
            <input type="checkbox" name="lock_comment" value="Y" <!--@if($oIssue->isLocked())-->checked="checked"<!--@end--> id="lock_comment" />
            <label for="lock_comment">{$lang->lock_comment}</label>
        <!--@endif-->
        <!--@if($module_info->secret=="Y")-->
            <input type="checkbox" name="is_secret" value="Y" <!--@if($oIssue->isSecret())-->checked="checked"<!--@end--> id="is_secret" />
            <label for="is_secret">{$lang->secret}</label>
        <!--@end-->
            <input type="checkbox" name="allow_comment" value="Y" <!--@if($oIssue->allowComment())-->checked="checked"<!--@end--> id="allow_comment" />
            <label for="allow_comment">{$lang->allow_comment}</label>
            <input type="checkbox" name="allow_trackback" value="Y" <!--@if($oIssue->allowTrackback())-->checked="checked"<!--@end--> id="allow_trackback" />
            <label for="allow_trackback">{$lang->allow_trackback}</label>
        <!--@if($is_logged)-->
            <input type="checkbox" name="notify_message" value="Y" <!--@if($oIssue->useNotify())-->checked="checked"<!--@end--> id="notify_message" />
            <label for="notify_message">{$lang->notify}</label>
        <!--@end-->
    </div>

	<div class="issuetrackerNavigation">
		<span class="buttonOfficial"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
	</div>

</div>
</form>


<form action="{Context::getRequestUri()}" method="get" style="display:none;">
<input type="hidden" name="vid" value="{$vid}" />
<!--@foreach($project->packages as $key => $val)-->
<select id="release_{$val->package_srl}">
    <option value="">{$lang->release}</option> 
    <!--@foreach($project->releases as $k => $v)-->
    <!--@if($val->package_srl == $v->package_srl)-->
    <option value="{$v->release_srl}" <!--@if($v->release_srl==$release_srl)-->selected="selected"<!--@end-->>{$v->title}</option> 
    <!--@end-->
    <!--@end-->
</select>
<!--@end-->
</form>
<script type="text/javascript">
    package = new Array();
    <!--@foreach($project->releases as $k => $v)-->
    if(!package['{$v->package_srl}']) package['{$v->package_srl}'] = new Array();
    package['{$v->package_srl}'][package['{$v->package_srl}'].length] = new Array('{$v->release_srl}','{$v->title}');
    <!--@end-->
</script>

<!--#include('footer.html')-->
